package com.app.mapper.supermarket;

import com.app.dto.supermarket.MyCollectDto;
import com.app.model.supermarket.MyCollectModel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;


@Component
@Mapper
public interface MyCollectMapper extends BaseMapper<MyCollectDto> {

      void insert(MyCollectModel model);

      void delete(int id);

      List<MyCollectModel> getCollectByMid(MyCollectModel model);


      List<MyCollectModel> getCollectByOid(MyCollectModel model);

      int deleteByOid(int keyId,int mid);// 根据人和零活id删除收藏

      MyCollectModel selectByOid(int keyId,int mid);// 先查询存不存在

      int countMid(int mid);//查询收藏数量


}
